﻿
@using BrnMall.Web.StoreAdmin.Models
@model BrnMall.Web.StoreAdmin.Models.BrokerageListModel

@section header{
    <title>佣金明细-佣金管理</title>
    <link type="text/css" rel="stylesheet" href="/admin_store/css/site.css"/>
    <script type="text/javascript" src="/admin_store/scripts/jquery.js"></script>
    <script type="text/javascript" src="/components/my97datepicker/WdatePicker.js"></script>
    <link rel="stylesheet" type="text/css"  href="/components/jbox/Skins/Default/jbox.css"/>
    <script type="text/javascript" src="/components/jbox/jquery.jBox-2.3.min.js"></script>
    <script type="text/javascript" src="/admin_store/scripts/selectlist.js"></script>
    <script type="text/javascript" src="/admin_store/scripts/showlist.js"></script>
}
@section body{
    <h1 class="rightH1 nav-fx">
        小程序分销 &gt; 佣金管理 &gt; <span class="rightH1-cur">佣金明细</span>
        <div class="right">
            <div class="clear"></div>
        </div>
        <div class="clear"></div>
    </h1>
    @using (Html.BeginForm("BrokerageList", "Distributor"))
    {
        <div class="dataListSearch">
            <table height="32">
                <tbody class="col2">
                    <tr>
                        <td class="td1">分销商名称：@Html.TextBoxFor(x => x.DisStoreName, new { height = "18" })</td>
                        <td class="td2" style="padding-left:14px;">订单号：@Html.TextBoxFor(x => x.OrderNo, new { height = "18" })</td>
                        <td><input id="SearchBrokerage" name="SearchBrokerage" type="image" class="searchBut submit" src="/admin_store/images/s.jpg" /></td>
                    </tr>
                    <tr>
                        <td style="padding-left:14px">开始时间：@Html.TextBox("tradeTimeStart", Model.TradeTimeStart, new { height = "18", onfocus = "WdatePicker({el:'tradeTimeStart'})" })</td>
                        <td colspan="2">结束时间：@Html.TextBox("tradeTimeEnd", Model.TradeTimeEnd, new { height = "18", onfocus = "WdatePicker({el:'tradeTimeEnd'})" })</td>
                    </tr>
                </tbody>
            </table>
        </div>

        <div class="dataList">
            <table width="100%">
                <thead>
                <tr>
                   
                    <th width="60" align="left">编号</th>
                    <th  align="left">买家昵称</th>
                    <th  align="left">订单号</th>
                    <th  align="left">交易金额</th>
                    <th  align="left">时间</th>
                    <th  align="left">类型</th>
                    <th  align="left">分销商</th>
                    <th  align="left">分佣类型</th>
                    <th  align="left">佣金点</th>
                    <th  align="left" style="width:60px">佣金</th>
                    
                </tr>
                </thead>
                <tbody>
                @foreach (BrokerageModel bro in Model.BrokerageList)
                {
                    <tr>                        
                        <td>@bro.Id</td>
                        <td>
                            <img style="border-radius: 25px;" width="50" height="50" alt="" src="@bro.TradeUser.Avatar" />
                            <br />
                            @bro.TradeUser.NickName
                        </td>
                        <td>@bro.OrderNo</td>
                        <td>@bro.OrderAmount.ToString("0.00")</td>
                        
                        <td>@bro.TradeTime.ToString("yyyy-MM-dd HH:mm:ss")</td>
                        <td>订单交易返佣</td>
                        <td>
                            <img style="border-radius: 25px;" width="50" height="50" alt="" src="@bro.Distributor.ShowLogo" />
                            <br />
                            @bro.Distributor.DisStoreName
                        </td>
                        <td>
                            @if (bro.Distributor.IsAgent == 0)
                            {
                                @:分销商
                            }
                            else
                            {
                                @:代理商
                            }
                        </td>
                        <td>@bro.BrokerageRise %</td>
                        <td><span style="color:#e17a00">@bro.BrokerageAmount</span>

</td>
                        
                       
                    </tr>
                }
                </tbody>
            </table>
        </div>
        <div class="dataListEdit">
            
            <div class="page">
                @Html.StoreAdminPager(Model.PageModel)
            </div>
        </div>
    }
}